import request from "@/utils/request";

/**
 * @param {date_tag} 日期标签
 * @param {start_date} 开始日期，date_tag=0时必传，yyyy-mm-dd
 * @param {end_date} 结束日期，date_tag=0时必传，yyyy-mm-dd
 * @returns
 */

export function getUserLineData({ date_tag, start_date, end_date }) {
  return request({
    url: "/statistics/user/hourly-count",
    method: "get",
    params: { date_tag, start_date, end_date }
  });
}

export function getUserLineCoinData({ date_tag, start_date, end_date }) {
  return request({
    url: "/statistics/user/amount",
    method: "get",
    params: { date_tag, start_date, end_date }
  });
}

export function getUserLineFlowData({ date_tag, start_date, end_date }) {
  return request({
    url: "/statistics/game/serial",
    method: "get",
    params: { date_tag, start_date, end_date }
  });
}

export function getUserBarData({ date_tag, start_date, end_date }) {
  return request({
    url: "/statistics/game/user-data",
    method: "get",
    params: { date_tag, start_date, end_date }
  });
}

export function getUserPieData({ date_tag, start_date, end_date }) {
  return request({
    url: "/statistics/serial-total",
    method: "get",
    params: { date_tag, start_date, end_date }
  });
}

export function getUserFunnelData({ date_tag, start_date, end_date }) {
  return request({
    url: "/statistics/user/count",
    method: "get",
    params: { date_tag, start_date, end_date }
  });
}
